<?php

declare(strict_types=1);

namespace App\Model\Ai\Tag;



use App\Model\Model;

/**
 * @property int $id 
 * @property int $picture_id 
 * @property string $label 
 * @property string $score 
 * @property string $status 
 * @property int $createtime 
 * @property int $updatetime 
 */
class TagDeepdanbooru extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'ai_tag_deepdanbooru';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = [];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'picture_id' => 'integer', 'createtime' => 'integer', 'updatetime' => 'integer'];
	const CREATED_AT = 'createtime';
	const UPDATED_AT = 'updatetime';
	
	/**
	 * Convert a DateTime to a storable string.
	 *
	 * @return null|string
	 */
	public function fromDateTime(mixed $value): mixed
	{
		return empty($value) ? $value : strval($this->asDateTime($value)->timestamp);
	}
}
